#include<iostream>
#include<unistd.h>
using namespace std;

int main()
{
    int fds[2] = {0};
    int n = pipe(fds);
    if(n < 0)
    {
        cerr<<"pipe error"<<endl;
        return 1;
    }
    cout<<"fds[0] "<<fds[0]<<endl;
    cout<<"fds[1] "<<fds[1]<<endl;
    return 0;
}